import http from './http'

/** 上传文件 */
export const uploadFile = (obj) => {
  return http({
    url: '/picture/upload',
    headers: {
      'content-type': 'multipart/form-data',
    },
    method: 'post',
    data: obj
  })
}

/** 上传文件 */
export const postFile = (param) => {
  return http({
    url: '/picture',
    method: 'get',
    params: param
  })
}

export const putFile = (obj) => {
  return http({
    url: '/picture',
    method: 'put',
    data: obj
  })
}

export const changeFolder = (obj) => {
  return http({
    url: '/picture/change/folder',
    method: 'put',
    data: obj
  })
}

/** 删除文件 */
export const delFile = (obj) => {
  return http({
    url: '/picture',
    method: 'delete',
    data: obj
  })
}


/* ------------------- 统计 ------------------- */
export const statistics = (param) => {
  return http({
    url: '/picture/statistics/all',
    method: 'get',
    params: param
  })
}